package com.thz.houserental.infrastructure.table;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("user")
@Schema(description = "用户表")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User {
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(title = "id")
    private String id;
    
    private String password;
    
    private String email;
    
    private String nickName;
    
    private String wechatId;
    
    @Schema(description = "手机号")
    private String phone;
    
    @Schema(description = "头像url")
    private String avatar;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
